package com.itheima.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.*;

/**
 * @author Xiao
 * @date 2021/9/18
 */
/*@Getter //getter()
@Setter //setter
@ToString   //toString
@NoArgsConstructor  //无参构造
@AllArgsConstructor //满参构造
@EqualsAndHashCode  //equals()和hashCode()*/
@Data   //所有方法
public class User {
//    @TableId(type = IdType.AUTO)
//    @TableId(type = IdType.INPUT)
//    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    private String name;
    private String password;
    private Integer age;
    private String tel;
    //逻辑删除字段，标记当前数据是否被删除
    @TableField(value = "deleted", select = false)
//    @TableLogic(value = "0", delval = "1")
    private Integer status;
    //乐观锁字段
    @Version
    @TableField(select = false)
    private Integer version;

    /*@Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", password='" + password + '\'' +
                ", age=" + age +
                ", tel='" + tel + '\'' +
                '}';
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }*/
}
